package com.js.purs.service.impl;

import java.util.List;

import com.js.purs.domain.PurBindFiles;
import com.js.purs.domain.dto.NoticeDto;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.js.purs.mapper.PurBindNoticeMapper;
import com.js.purs.domain.PurBindNotice;
import com.js.purs.service.IPurBindNoticeService;

/**
 * 招标公告Service业务层处理
 * 
 * @author lzq
 * @date 20240627
 */
@Service
public class PurBindNoticeServiceImpl implements IPurBindNoticeService 
{
    @Autowired
    private PurBindNoticeMapper purBindNoticeMapper;

    /**
     * 查询招标公告
     * 
     * @param ntId 招标公告主键
     * @return 招标公告
     */
    @Override
    public PurBindNotice selectPurBindNoticeByNtId(String ntId)
    {
        return purBindNoticeMapper.selectPurBindNoticeByNtId(ntId);
    }

    /**
     * 查询招标公告列表
     * 
     * @param purBindNotice 招标公告
     * @return 招标公告
     */
    @Override
    public List<PurBindNotice> selectPurBindNoticeList(PurBindNotice purBindNotice)
    {
        return purBindNoticeMapper.selectPurBindNoticeList(purBindNotice);
    }

    /**
     * 新增招标公告
     * 
     * @param purBindNotice 招标公告
     * @return 结果
     */
    @Override
    public int insertPurBindNotice(PurBindNotice purBindNotice)
    {
        purBindNotice.setCreateTime(DateUtils.getNowDate());
        return purBindNoticeMapper.insertPurBindNotice(purBindNotice);
    }

    /**
     * 修改招标公告
     * 
     * @param purBindNotice 招标公告
     * @return 结果
     */
    @Override
    public int updatePurBindNotice(PurBindNotice purBindNotice)
    {
        return purBindNoticeMapper.updatePurBindNotice(purBindNotice);
    }

    /**
     * 批量删除招标公告
     * 
     * @param ntIds 需要删除的招标公告主键
     * @return 结果
     */
    @Override
    public int deletePurBindNoticeByNtIds(String[] ntIds)
    {
        return purBindNoticeMapper.deletePurBindNoticeByNtIds(ntIds);
    }

    /**
     * 删除招标公告信息
     * 
     * @param ntId 招标公告主键
     * @return 结果
     */
    @Override
    public int deletePurBindNoticeByNtId(String ntId)
    {
        return purBindNoticeMapper.deletePurBindNoticeByNtId(ntId);
    }

    @Override
    public int updatePurBindNoticeBySendTime(String ntId) {
        return purBindNoticeMapper.updatePurBindNoticeBySendTime(ntId);
    }

    @Override
    public List<PurBindNotice> selectBindNoticeList() {
        return purBindNoticeMapper.selectBindNoticeList();
    }

    @Override
    public int updatePurBindNoticeRemark(NoticeDto noticeDto) {
        return purBindNoticeMapper.updatePurBindNoticeRemark(noticeDto);
    }


}
